const crawler = require('../../libs/crawler'),
      { crawlerConf } = require('../../config/config');

crawler({
  url: crawlerConf.url.main,
  callback () {
    const $ = window.$,
        $section = $('.agency-head');
    return {
      logoUrl: $section.find('.agency-head-logo').prop('src').replace('webp', ''),
      name: $section.find('.ag-title-main').text(),
      feedbackRate: $section.find('.ag-info span').eq(0).text().replace(/[^0-9]/ig, ''),
      //好评率 eq 0 表示第0项
      studentCount: $section.find('.js-item-num').attr('data-num'),
      description: $section.find('.ag-info-des').text(),
      qqLink: $section.find('.ag-info-btn').prop('href'),
      logoKey: ''
    }
  }
})